package com.lovegu.other;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author 老顾
 * @title: TestMatcher
 * @projectName java-restudy
 * @email: 1437594522@qq.com
 * @date 2022/10/16 18:27
 */
public class TestMatcher {

    private static String regexExp = "^(.*)<arg0>(.*)</arg0>(.*)$";

    public static void main(String[] args) {
        String body ="<arg0>{\"exchangetype\":\"01\"}</arg0>";
        Pattern pattern = Pattern.compile(regexExp);
        Matcher matcher = pattern.matcher(new String(body));
        System.out.println(matcher.find());
        String jsonBody = matcher.group(2);
        System.out.println("json"+jsonBody);

    }
}
